import java.util.Hashtable;

/**
 * Collection class for the data we need to report.
 */
public class DataObj {
	/**
	 * Hasthable containing how many times a keyword was found.
	 */
	private Hashtable<String, Integer> table;
	
	/**
	 * Url that was parsed.
	 */
	private String url;
	
	/**
	 * Number of urls found.
	 */
	private int numUrls;
	
	/**
	 * Number of words on the page.
	 */
	private int numWords;
	
	/**
	 * How long it took to parse.
	 */
	private long runTime;
	
	/**
	 * Private default constructor.
	 */
	private DataObj() {}
	
	/**
	 * Constructor.
	 * @param htable Hasthable containing how many times a keyword was found
	 * @param url Url that was parsed
	 * @param numUrls Number of urls found
	 * @param numWords Number of words on the page
	 * @param runTime How long it took to parse
	 */
	public DataObj(Hashtable<String, Integer> htable, String url, int numUrls, int numWords, long runTime) {
		this();
		this.table = htable;
		this.url = url;
		this.numUrls = numUrls;
		this.numWords = numWords;
		this.runTime = runTime;
	}
	
	/**
	 * @return Hasthable containing how many times a keyword was found
	 */
	public Hashtable<String, Integer> htable() {
		return table;
	}
	
	/**
	 * @return Url that was parsed
	 */
	public String url() {
		return url;
	}
	
	/**
	 * @return Number of urls found
	 */
	public int numUrls() {
		return numUrls;
	}
	
	/**
	 * @return Number of words on the page
	 */
	public int numWords() {
		return numWords;
	}
	
	/**
	 * @return How long it took
	 */
	public long runTime() {
		return runTime;
	}
}
